/*
 * @Description: Ts omit一致过滤数据
 * @Autor: lcz
 * @Date: 2022-08-12 16:00:17
 * @LastEditors: lcz
 * @LastEditTime: 2022-08-15 10:25:12
 */

export default function omit<T extends object, K extends keyof T>(obj: T, arr: K[]): Omit<T, K> {
  const clone = { ...obj };
  if (Array.isArray(arr)) {
    arr.forEach(i => {
      delete clone[i]
    })
  }
  return clone
}
